Socket
Socket
Sign inDemoInstall

tappable

Package Overview
Dependencies
2
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tappable

Tapable with Promise support


Version published
Weekly downloads
33
decreased by-10.81%
Maintainers
1
Install size
104 kB
Created
Weekly downloads
 

Readme

Source

CircleCI Codecov npm

Tappable

Tapable with promise support.

Setup

yarn add tappable
# or
npm install --save tappable
// Require module
const Tapable = require('tappable')

Usage

For basic usage please see tapable docs.

applyPlugins*

This functions are wrapped with pify and return promise too.

// Using async/await
await this.applyPluginsAsync('init')

// Using Promise
this.applyPluginsAsync('init')
.then(() => {
  // Applied
})
.catch(err => {
  // Some error happened
})

plugin(names, handler)

When register plugins handler function can also return promise instead of calling callback argument.

webpack.plugin('init', async () => {
  // You can use async/await here  
})

// or
webpack.plugin('init', () => new Promise((resolve, reject) => {
  // Call resolve() or rejcet() when finished or chain promise
}))

License

MIT

Keywords

FAQs

Last updated on 17 Jul 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc